include_directories(
${SurvivalAnalysis_SOURCE_DIR}/pParametric
${SurvivalAnalysis_SOURCE_DIR}/tclap-1.2.1/include
${SurvivalAnalysis_SOURCE_DIR}/common
)

link_directories(${SurvivalAnalysis_BINARY_DIR}/pParametric)
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
 
set (PPARAMETRIC_SOURCE
asa239.H
Data.h
Likelihood.h
ModelFile.h
ModelTypeParam.h
ParamMatrix.h
PolyZO.h
DataFactory.h
asa239.cpp
CommandLine.cpp
Likelihood.cpp
PolyZO.cpp
DataFactory.cpp
${SurvivalAnalysis_SOURCE_DIR}/common/blmvm-1.1ez.c
${SurvivalAnalysis_SOURCE_DIR}/common/Matrix.cpp
${SurvivalAnalysis_SOURCE_DIR}/common/Milliseconds.cpp
${SurvivalAnalysis_SOURCE_DIR}/common/OutputFormat.cpp
${SurvivalAnalysis_SOURCE_DIR}/common/QNOpt.cpp
${SurvivalAnalysis_SOURCE_DIR}/common/StrataSplit.cpp
)

add_definitions(-DSYMBOLIC)

if(UNIX)
	add_definitions(-DUSE_GCC)
	find_package(OpenMP)
	if (OPENMP_FOUND)
		set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
	endif()
endif(UNIX)

if(WIN32)
	add_definitions(-D_MSC_VER)
endif(WIN32)

add_executable(pParametricReg ${PPARAMETRIC_SOURCE})
#target_link_libraries(pCox m)

